import { getCategoryApi } from "@/apis/Layout.js"
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useCategoryStore = defineStore('category', () => {

  const List = ref([])
  const getCategory = async () => {
    const res = await getCategoryApi()
    if (res.data.code == 1) {
      List.value = res.data.result
    }
  }
  return {
    List,
    getCategory
  }
  })